home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / program / t_bcinfo.zip / TI800.ZIP / TI800.ASC
Text File  |  1992-02-25  |  815b  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.   PRODUCT  :  C++                                    NUMBER  :  800
  10.   VERSION  :  All
  11.        OS  :  PC DOS
  12.      DATE  :  February 25, 1992                        PAGE  :  1/1
  13.     TITLE  :  Don't Overlook argv[0]!
  14.  
  15.  
  16.  
  17.  
  18.   The declaration
  19.  
  20.           int main (int argc, char *argv[]) {
  21.  
  22.   is a familiar sight.  What you may not know is that argv[0] is a
  23.   small treasure.  It is the name of the program that is running.
  24.   It also contains the path of the program.  For instance, if it is
  25.   necessary to know the path from which an exceuting program was
  26.   invoked, use the fnsplit() function to extract the path from
  27.   argv[0].  You can also find out if the program has been renamed
  28.   after it was compiled.
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.